package com.study.dao; 

import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.study.entity.Admin;

/**  
 *  操作数据库的dao层
 */  

public interface AdminDao  
{
    //增加一个Admin
    public void saveAdmin(Admin admin);
	//根据id查询Admin
    public Admin getAdminById(String id);
	//分页条件查询Admin
	public List<Admin> listAdmin(@Param("admin") Admin admin, @Param("from") String from, @Param("number") String number);
	public long getAdminCount(@Param("admin") Admin admin);
	//根据id删除Admin
	public boolean removeAdminById(String id);
	//更新Admin
	public void updateAdmin(Admin admin);
	/**
	 *	条件更新
	 */
	//更新Admin表中的password
	public boolean updatePasswordInAdmin(@Param("id") String id, @Param("password")String password);

	Admin selectByUsername(String username);
}